home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / russell / russell.lha / examples / compose.r < prev    next >
Text File  |  1989-12-29  |  228b  |  11 lines

  1. let
  2.   compose ==
  3.     func[f: func[val t2]val t3; g: func[val t1]val t2; t1,t2,t3: type{}]
  4.         {func[x: val t1]val t3 { f[g[x]] }};
  5.   incr == func[x: val Short] { x + 1 };
  6.   nput == compose[Short$put, incr];
  7. in
  8.   nput[3]
  9. ni
  10.  
  11.